//
//  Entity.h
//  CompGraf2
//
//  Created by Juan Niosi on 09/08/11.
//  Copyright 2011 __MyCompanyName__. All rights reserved.
//

#import "Texture.h"
#import "TransformObject.h"
#import "Bounds.h"
#import "Camera.h"

@interface Entity : TransformObject
{
    GLfloat *vertices;
    GLfloat *colors;
    Texture *texture;
    GLfloat *uvs;
    GLint vertCount;
    Bounds *bounds;
    //TODO normals GL_NORMAL_ARRAY
    GLfloat *normals;
}
@property (nonatomic) GLfloat *vertices;
@property (nonatomic) GLfloat *normals;
@property (nonatomic) GLfloat *colors;
@property (nonatomic) GLfloat *uvs;
@property (nonatomic, retain) Bounds *bounds;
@property (retain, nonatomic) Texture *texture;
@property (nonatomic) GLint vertCount;

- (id)initWithVertices:(GLfloat *)verts vertCount:(GLint)vCount setColor:(GLfloat *)cols;
- (id)initWithVertices:(GLfloat *)verts vertCount:(GLint)vCount setTexture:(Texture *)tex setUVs:(GLfloat *)uvArray setNormals:(GLfloat *)vNormals;
- (void)update:(float)deltaTime;
- (void)draw:(Engine *)engine:(Camera *)cam;
- (void)merge:(Entity *)ent1;
- (void)move:(Vector3 *)movement;
- (void)updateBounds;

@end
